<div class="row">
    <div class="col-lg-12 text-center">
        <div class="panel panel-default">
            <div class="panel-body">
                <!-- Course Picture -->
                <div class="col-lg-3 text-left">
                {% if course.image != None and course.image != '' %}
                    <img src="{{ course.image.url }}" height="100%" width="100%" />
                {% else %}
                    Missing Image!
                {% endif %}
                </div>
                <!-- Course Info -->
                <div class="col-lg-9 text-left">
                    <h2>{{ course.title }}<br/>
                        {% if teacher == course.teacher %}
                            <small>[You cannot enroll in a class you currently teach!]</small>
                        {% else %}
                            <small>{{ course.sub_title }}</small>
                        {% endif %}
                    </h2>
                    {% if course.is_official %}<p align="left"><span class="badge">Offical</span></p>{% endif %}
                    <p>{{ course.description }}<p>
                    <p>Durration: {{ course.start_date }} to {{ course.finish_date }}</p>
                    <p align="right">
                    <button onclick="ajax_enroll({{ course.id }});"
                               type="button"
                        {% if teacher == course.teacher %}
                           disabled=""
                        {% endif %}
                        {% if student not in course.students.all %}
                              class="btn btn-lg btn-success">
                                <i class="fa fa-pencil"></i> Enroll
                        {% else %}
                              class="btn btn-lg btn-primary">
                            <i class="fa fa-level-down"></i> Continue
                        {% endif %}
                    </button>
                    </p>
                </div>
                <!-- /.Course Info -->
            </div>
        </div>
    </div>
</div>